home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Modules
/
BackSpaceModules
/
Source
/
Bezier
/
BezierView.m
< prev
next >
Wrap
Text File
|
1992-04-27
|
978b
|
60 lines
#import "BezierView.h"
#import <appkit/Application.h>
#import "BezierWraps.h"
#import <dpsclient/wraps.h>
@implementation BezierView
+ initialize
{
if ( self == [BezierView class] )
{
// load PostScript procedures SpaceView needs
// must be careful these are loaded into the correct context
PSWbezierCreate();
}
return self;
}
- oneStep
{
PSWbezierOneStep();
return self;
}
- initFrame:(NXRect *)frameRect
{
[super initFrame:frameRect];
[self allocateGState]; // For faster lock/unlockFocus
[self setClipping:NO]; // even faster...
[self newSize];
return self;
}
- sizeTo:(NXCoord)width :(NXCoord)height
{
[super sizeTo:width :height];
[self newSize];
return self;
}
- drawSelf:(const NXRect *)rects :(int)rectCount
{
if (!rects || !rectCount) return self;
PSsetgray(0);
//NXRectFill(rects);
return self;
}
- newSize
{
//this keeps the bezier size legal
PSWbezierInit(bounds.size.width, bounds.size.height);
return self;
}
@end